<style type="text/css">
    .bjui-pageHeader{
        font-size: 18px;
        font-weight: bold;
    }
    .form{
        padding: 15px;
    }
    .form dl {
        overflow: hidden;
        padding-top: 15px;
    }

    .form dt {
        color: #666;
        float: left;
        font-size: 14px;
        padding: 3px 0 0;
        width: 11%;
    }
    .form dd {
        float: left;
        line-height: 22px;
    }
    dd.desc {
        height: 30px;
        padding: 0 10px;
        width: 150px;
    }
</style>
<div class="bjui-pageHeader">
    <div class="glyphicon glyphicon-th-large">属性列表</div>
    <button type="button" class="btn-default" data-toggle="dialog" data-id="mydialog2" data-url="{:U('Items/add', array('group' => $group))}" data-title="添加模型" data-icon="plus">添加属性</button>
</div>
<div class="bjui-pageContent">
    <form action="{:U('Items/sort', array('group' =>$group))}" method="post" data-toggle="validate">
        <table  class="table table-bordered table-hover table-striped table-top" data-toggle="tabledit" data-initnum="0" data-action="{:U('Items/edit')}">
        <thead>
            <tr data-idname="customList[#index#][id]">
                <th title="名称"><input type="text" name="customList[#index#][name]" data-rule="required" value="名称" size="5"></th>
                <th title="类组别名"><input type="text" name="customList[#index#][group]" data-rule="required" value="类组别名" size="5"></th>
                <th title="枚举值"><input type="text" name="customList[#index#][value]" data-rule="number" value="1" size="5"></th>
                <th title="排序"><input type="text" name="customList[#index#][sort]" data-rule="number" value="1" size="5"></th>
                <th title="操作" width="100"></th>
            </tr>
        </thead>
        <tbody>
            <foreach name='vlist' item='v'>
                <tr data-id="{$v.id}">
                    <td>{$v.name}</td>
                    <td>{$v.group}</td>
                    <td>{$v.value}</td>
                    <td>{$v.sort}</td>
                    <td data-noedit="true">
                        <button type="button" class="btn-default" data-toggle="doedit">编辑</button>
                        <button type="button" class="btn-default" data-toggle="doajax" data-type="get" data-url="{:U('Items/del', array('id' =>$v['id'],'group' => $v['group']))}" data-confirm-msg="确定要删除吗？">删除</button>
                    </td>
                </tr>
            </foreach>
        </tbody>
        </table>
        <div class="th" style="clear: both;">{$page}</div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">关闭</button>
        </li>
    </ul>
</div>